<?php
$cli = new \swoole_http_client('127.0.0.1', 9502);

$cli->on('message', function ($_cli, $frame) {

});

$cli->upgrade('/', function ($cli) {
    echo $cli->body;
    $cli->push('"message":"1","user_id":1,"room_id":1,"type":"message"');
});

$cli->push( '"message":"1","user_id":1,"room_id":1,"type":"message"');